home *** CD-ROM | disk | FTP | other *** search
/ Run Magazine ReRun 1984 Half 1 / rerun-1984-01-06-side-b.d64 / serpent module (.txt) < prev    next >
Commodore BASIC  |  2022-09-20  |  5KB  |  156 lines

  1. 1 rem serpent of death by jim & tom hoppe april '83
  2. 4 poke36869,255:goto20000
  3. 5 dimjs(2,2)
  4. 6 fs=7991:fc=38711:ss=7713:cs=38433:s=7712:c=38432
  5. 7 if4*(peek(36866)and128)+64*(peek(36869)and112)=4096thengosub10000
  6. 10 fori=0to2:forj=0to2:readjs(j,i):nextj,i
  7. 50 ts=0:l=1:aa=100:dd=37154:pa=37137:pb=37152:cd=1
  8. 52 bs=1:vs=5:bs=1
  9. 55 poke37139,0:poke36878,15
  10. 90 ifpeek(52)=28then95
  11. 95 poke36879,157:poke36869,255
  12. 100 print"[147]"tab(32)"@ab"tab(32)"bbb"tab(31)"@bcab"tab(31)"cabbb"tab(30)" bbbcab"
  13. 110 printtab(8)"@bcabbb"tab(29)"@@abbbcab"tab(29)"bbbbcabbb"tab(28)"@@bcabbbcab"
  14. 120 printtab(6)"c@abbbcabbb"tab(27)" bbbbcabbbcab"tab(27)"@@bcabbbcabbb"
  15. 130 printtab(4)" bcabbbcabbbcab"tab(25)" @abbbcabbbcabbb"
  16. 140 printtab(4)"bbbcabbbcabbbbb"tab(25)" jkjjkjkjjkjkjk"
  17. 210 pokes+h+22*v,4:pokec+h+22*v,2
  18. 500 gosub9000
  19. 510 ifts>0thents=(ts-1)
  20. 550 gosub2000
  21. 560 js=js(x+1,y+1):ifjs<8thengosub1500
  22. 590 iffr=1thengosub3500
  23. 700 ifts=0andvn=1thengoto6000
  24. 710 ifts>0thenprint"cobra venom active "right$(str$(ts),2)
  25. 1000 goto500
  26. 1499 rem jump
  27. 1500 pokes+h+22*v,ba:pokec+h+22*v,c1
  28. 1501 ifjs=0thenv=v-4:ifv<-3thenv=-1
  29. 1502 ifjs=1thenv=v-3:h=h+1:ifv=-3thenv=-1
  30. 1503 ifjs=2thenh=h+1:v=v-1
  31. 1504 ifjs=3thenh=h+1
  32. 1505 ifjs=4thenv=v+1
  33. 1506 ifjs=5thenh=h-1
  34. 1507 ifjs=6thenh=h-1:v=v-1
  35. 1508 ifjs=7thenv=v-3:h=h-1:ifv=-3thenv=-1
  36. 1510 ba=peek(s+h+22*(v-1)):c2=(peek(c+h+22*(v-1))and15)
  37. 1515 pokes+h+22*(v-1),4:pokec+h+22*(v-1),2
  38. 1520 pokes+h+22*(v-1),ba:pokec+h+22*(v-1),c2
  39. 1525 gosub3050
  40. 1530 return
  41. 1999 rem snakes
  42. 2000 ifct=0thencd=1
  43. 2001 pokess+hs+22*vs,bs:pokecs+hs+22*vs,cd
  44. 2003 gs=int(rnd(1)*4)+1
  45. 2005 ifgs=1thenvs=vs-3:hs=hs+1:pokefs+22*up,32:fs=7991:fc=38711
  46. 2006 ifgs=2thenhs=hs+1:ifl>2thenpokefs+22*up,32:fs=7962:fc=38682
  47. 2007 ifgs=3thenhs=hs-1:ifl>4thenpokefs+22*up,32:fs=7840:fc=38560
  48. 2008 ifgs=4thenvs=vs-3:hs=hs-1:ifl>6thenpokefs+22*up,32:fs=7827:fc=38547
  49. 2009 pokefs+22*up,6:pokefc+22*up,6
  50. 2010 bs=peek(ss+hs+22*(vs-1)):cd=(peek(cs+hs+22*(vs-1))and15)
  51. 2015 pokess+hs+22*(vs-1),8:pokecs+hs+22*(vs-1),5
  52. 2020 pokess+hs+22*(vs-1),bs:pokecs+hs+22*(vs-1),cd
  53. 2025 gosub4050
  54. 2030 return
  55. 3049 rem falling
  56. 3050 v=v+1
  57. 3051 ifv>16thengoto5000
  58. 3060 ba=peek(s+h+22*v):c2=((peek(c+h+22*v))and15)
  59. 3070 pokes+h+22*v,4:pokec+h+22*v,2
  60. 3074 print""tab(17)"level[157][157][157][157]"l
  61. 3075 if((ba=0orba=1orba=3)andc2=1)thenct=ct+1:cw=cw+1
  62. 3076 ifba=8thenco=co+100:cw=cw+100:ts=0:vn=0:gosub55000
  63. 3077 print"score"cw"":ifct>54thengoto60000
  64. 3078 ifct+co>aathenba=bs:goto60000
  65. 3079 ifba=6thents=0:vn=0:poke36879,157:print"                         "
  66. 3080 ifba=8thents=0:vn=0:poke36879,157:print"                         "
  67. 3081 ifba=1orba=3orba=0orba=6orba=7thenpoke36874,200:fort=1to200:next:poke36874,0:return
  68. 3090 pokes+h+22*v,ba:pokec+h+22*v,c2
  69. 3099 goto3050
  70. 3500 ifv=0thenreturn
  71. 3501 ifba<>6thenreturn
  72. 3505 up=up-1
  73. 3510 pokefs+22*(up+1),32
  74. 3515 pokefs+22*up,6:pokefc+22*up,6
  75. 3520 ifgs=1orgs=2thenk=15:ifgs=3orgs=4thenk=8
  76. 3530 ifup<-15thenpoke36876,0:v=0:h=0:up=0:pokefs,6:ba=0:goto210
  77. 3540 poke36876,190-up
  78. 4000 goto3505
  79. 4050 vs=vs+1
  80. 4052 ifvs>15thenvs=0:hs=0:cd=peek(cs):bs=1:return
  81. 4060 bs=peek(ss+hs+22*vs):cd=((peek(cs+hs+22*vs))and15)
  82. 4070 pokess+hs+22*vs,8:pokecs+hs+22*vs,5
  83. 4074 ifbs=0orbs=1orbs=3thengosub58000
  84. 4075 ifbs<>4thengoto4080
  85. 4076 ifbs=4andts=0thents=20:vn=1:poke36879,170
  86. 4077 fort=1to100:poke36877,255-t:nextt:poke36877,0:pokess+hs+22*vs,4:pokecs+hs+22*vs,2
  87. 4080 ifbs=0orbs=1orbs=3thenreturn
  88. 4090 pokess+hs+22*vs,bs:pokecs+hs+22*vs,cd
  89. 4099 goto4050
  90. 4999 rem noise falling
  91. 5000 poke36878,15:fort=1to30
  92. 5010 poke36875,220-t
  93. 5040 form=1to30:nextm
  94. 5050 nextt
  95. 5060 poke36875,0:forl=1to20:poke36877,199+l:nextl:poke36877,0
  96. 5070 fort=1to1000:nextt:goto6000
  97. 5999 rem death
  98. 6000 poke36879,8
  99. 6010 print"[147]king tut is dead!!"
  100. 6020 print"even the mummy can't   save him now!"
  101. 6025 print"score="cw
  102. 6030 poke36875,0:ts$="00"
  103. 6050 poke36878,15:form=1to5:fort=255to128step-1:poke36874,t:nextt:nextm:poke36874,0
  104. 6051 goto20000
  105. 7000 poke36874,200:fort=1to200:next:poke36874,0
  106. 7020 return
  107. 8999 remjoystick
  108. 9000 pokedd,127:s3=-((peek(pb)and128)=0):pokedd,255
  109. 9010 p=peek(pa):s1=-((pand8)=0):s2=((pand16)=0):s0=((pand4)=0)
  110. 9020 fr=-((pand32)=0):x=s2+s3:y=s0+s1:return
  111. 10000 fs=4407:fc=38199:ss=4129:cs=37921:s=4128:c=37920:return
  112. 20000 print"[147]":poke36879,25
  113. 20010 print"[144]     the"
  114. 20020 print"serpent of death"
  115. 20030 forb=0to22:pokeb+7680,8:poke38400+b,5:nextb
  116. 20035 forb=0to22:poke7702+b*22,8:poke38422+b*22,5:nextb
  117. 20040 forb=0to22:poke7723+b*22,8:poke38443+b*22,5:nextb
  118. 20045 forb=0to20:poke8165+b,8:poke38885+b,5:nextb
  119. 20050 print"[144]starring:"
  120. 20052 print"[144]king tut[146]  d "
  121. 20055 print"[144]the mummy   [146]f"
  122. 20060 print"[144]ms. cobra   [146]h"
  123. 20070 print"  score="cw
  124. 20071 restore:gosub63010
  125. 20072 print" [156]hit any key"
  126. 20075 geta$:ifa$=""then20075
  127. 20100 restore:clr:goto5
  128. 49999 rem snake hiss
  129. 50000 fort=1to100:poke36877,255-t:nextt
  130. 50100 poke36877,0:return
  131. 55000 forx=1to90:poke36874,128+x:nextx
  132. 55050 forx=1to90:poke36874,218-x:nextx
  133. 55100 poke36874,0
  134. 55150 return
  135. 57999 remsnake hit square
  136. 58000 poke36877,200:poke36877,0:return
  137. 59999 rem harder level
  138. 60000 l=l+1:ct=0:co=0:v=0:h=0:vs=3:hs=0:cd=1:ba=0:bs=3
  139. 60010 cd=c1:ifl>1thenc1=3:aa=200:ifl>2thenc1=6:aa=300:ifl>3thenc1=5:aa=400
  140. 60015 ifl>4thenc1=4:aa=500:ifl>5thenc1=2:aa=600:ifl>6thenc1=7:aa=700
  141. 60017 gosub3079
  142. 60020 goto95
  143. 63010 poke36878,15:b=.4
  144. 63012 fori=0to2:forj=0to2:readjs(j,i):nextj,i
  145. 63015 readq,r
  146. 63020 ifq=0thenreturn
  147. 63030 poke36876,q
  148. 63040 t=ti+b*r
  149. 63050 ifti<tthen63050
  150. 63060 poke36876,0
  151. 63070 goto63015
  152. 63400 data7,0,1,6,8,2,5,4,3
  153. 63500 data195,45,201,45,203,99,201,99,195,99,195,45,201,45
  154. 63510 data203,45,215,45,201,45,203,45,195,80,195,5,201,5,207,5,209,5,215,5,219,5,223,5
  155. 63520 data225,5,0,0
  156.